package com.blb.community_admin.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.blb.community_admin.entity.SysRoleMenu;
import com.blb.community_admin.mapper.SysRoleMenuMapper;
import com.blb.community_admin.service.ISysRoleMenuService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class SysRoleMenuServiceImpl extends ServiceImpl<SysRoleMenuMapper, SysRoleMenu> implements ISysRoleMenuService {

    @Resource
    private SysRoleMenuMapper sysRoleMenuMapper;

    @Override
    public List<SysRoleMenu> getByRoleId(Long roleId) {
        List<SysRoleMenu> sysRoleMenus = sysRoleMenuMapper.selectByRoleId(roleId);
        return sysRoleMenus;
    }

    @Override
    public void delByRoleId(Long roleId) {
        sysRoleMenuMapper.selectDelByRoleId(roleId);
    }
}
